import { request } from "../utils/request";

/**
 * 通过小程序获取并绑定用户手机号
 * @param code
 * @returns
 */
export function bindUserPhoneNumber(code: string) {
  return request({
    url: "/app/index.php?i=1&c=wxapp&a=me&do=bind_mobile",
    method: "POST",
    data: { code },
  });
}

export function getUserInfo() {
  return request({
    url: "/app/index.php?i=1&c=wxapp&a=me&do=profile",
  });
}

// 修改用户信息
export function updateUserInfo(data: any) {
  return request({
    url: "/app/index.php?i=1&c=wxapp&a=me&do=update",
    method: "POST",
    data,
  });
}
